# -*- coding:utf-8 -*-
"""
@Author    :Ven
@FileName  :IdentifySettingsActivity.py
@Time      :2022/1/3 17:08
@文档说明   :
"""
from appium.webdriver.common.touch_action import TouchAction

from activity.IdentificationActivity import IdentificationActivity
from activity.LoginActivity import LoginActivity
from activity.MainMenuActivity import MainMenuActivity
from common.baseactivity import BaseActivity


class IdentifySettingsActivity(BaseActivity):
    def __init__(self):
        super().__init__()
        self.radio_white_led_period = ('id','com.sykean.biometrics:id/radio_white_led_period')
        self.white_led_time1 = ('id','com.sykean.biometrics:id/edit_white_led_time1')
        self.white_led_time2 = ('id','com.sykean.biometrics:id/edit_white_led_time2')
        self.hour = ('id','com.sykean.biometrics:id/hour')

    def set_white_led(self):
        self.ele_click(self.radio_white_led_period)
        self.ele_click(self.white_led_time1)
        # 时间控件时间滑动选择
        self.driver.swipe(760,360,760,280)

if __name__ == '__main__':
    IdentificationActivity().loginLogo()
    LoginActivity().login()
    MainMenuActivity().to_menu_identify()
    IdentifySettingsActivity().set_white_led()

